#include "InGameState.h"

CInGameState::CInGameState(void)
{
	//mSkullModel.LoadModelFromXFile("skullocc.x");
	mSkullModel.LoadModelFromXFile("Car.X");
}

CInGameState::~CInGameState(void)
{
}

void CInGameState::Init()
{

}

void CInGameState::Update(float dt)
{
	DirectInput::GetInstance()->poll();
	if(DirectInput::GetInstance()->keyDown(DIK_ESCAPE))
	{
		//StateManagement::GetInstance()->SwitchState(new CMainMenuState());
		StateManagement::GetInstance()->PushState(new CMenuInGameState());
	}
	mSkullModel.Update(dt);	
}

void CInGameState::Render()
{
	gd3dDevice->Clear(0, 0, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(255, 0, 255), 1.0f, 0);

	mSkullModel.Render();
}

void CInGameState::Release()
{

}